<?php
abstract class HelloCMS_Model_Mapper{
	protected $_dbTable = null;
	protected $_dbTableName = null;

	public function setDbTable(){
		if(is_string($this->_dbTableName)){
			$dbTable = new $this->_dbTableName;
		}
		if(!$dbTable instanceof Zend_Db_Table_Abstract){
			throw new Exception("Invalid table:'.$this->_dbTableName.' provided.");
		}
		$this->_dbTable = $dbTable;
		return $this;
	}

	public function getDbTable(){
		if(null == $this->_dbTable){
			$this->setDbTable();
		}
		return $this->_dbTable;
	}
}